<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    <div class="container-div">
    	<div class="row">
    	<div class="col-sm-12 search-collapse">
				<form id="proMons-form">
					<div class="select-list">
						<ul>
							<li>
								<label class="col-sm-3 control-label">项目名称：</label>
								<div class="col-sm-8">
									<select id="proId" name="proId" class="form-control m-b" th:with="type=${@ProInfoServiceImpl.selectProsBySta('0')}">
										<option value="">请选择...</option>
										<option th:each="dict : ${type}" th:text="${dict.proName}" th:value="${dict.proId}"></option>
									</select>
								</div>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							    <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
		<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
			<a class="btn btn-success" onclick="expProPmons()">
				<i class="fa fa-download"></i> 导出
			</a>
		</div>
		<div class="col-sm-12 select-table table-striped">
			<table id="bootstrap-table" data-mobile-responsive="true"></table>
		</div>
    </div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "pm/proPmons";
        var wlDatas = [[${@dict.getType('pm_emp_level')}]];
        
        $(function() {
            var options = {
                url: prefix + "/list",
                modalName: "项目人月使用情况",
                pagination : false,//不分页
                search:false,
                showSearch:false,
                showColumns:false,
                showToggle:false,
                showExport:false,
                showRefresh:false,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'proId', 
					title : '项目主键',
					visible: false
				},
				{
					field : 'proSelfSn', 
					title : '公司项目编号' 
				},
				{
					field : 'proName', 
					title : '项目名称' 
				},
				{
					field : 'wlLevel', 
					title : '人员级别',
		            formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(wlDatas, value);
		            }
				},
				{
					field : 'wlPmons', 
					title : '人月数' 
				},
				{
					field : 'usedPmons', 
					title : '使用人月数' 
				},
				{
					field : 'remnPmons', 
					title : '剩余人月数' 
				}]
            };
            $.table.init(options);
        });
        
    </script>
</body>
</html>